package day0324;

import java.util.Arrays;

public class Test7 {
    public static void main(String[] args) {
        int[]  a={1,2,2,3};
        int[]  c={};

        int cIndex=0;
        A:for (int i = 0; i < a.length ; i++) {
            int aEle = a[i];
            //c数组中是否有aEle
            for (int j = 0; j < c.length; j++) {
                if(aEle==c[j]){
                    continue A;
                }
            }
            c=Arrays.copyOf(c, c.length+1);
            c[cIndex]=a[i];
            cIndex++;
        }

        System.out.println(Arrays.toString(c));







    }
}
